package Javaa.Base;
// create an example of using Io class

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException; 
public class Io {
    public static void main(String[] args) {
        String filePath = "example.txt"; // specify your file path here

        // Using BufferedReader to read the file
        try (BufferedReader br = new BufferedReader(new FileReader(filePath))) {
            String line;
            while ((line = br.readLine()) != null) {
                System.out.println(line);
            }
        } catch (IOException e) {
            e.printStackTrace();    
        }
    }
}